define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'mall.order/index',
        edit_url: 'mall.order/edit',
        info_url: 'mall.order/info',
        delete_url: 'mall.order/delete',
        modify_url: 'mall.order/modify',
    };
    var Controller = {
        index: function () {
            ea.table.render({
                init: init,
                height:'full-50',
                cols: [[
                    {type: 'checkbox'},
                    {field: 'id', title: 'id',search: false},
                    {field: 'title', title: '产品名称'},
                    {field: 'realname', title: '申请人', search:false},
                    {field: 'mobile',  title: '联系电话', search:false},
                    {field: 'status', search: 'select', selectList: {"0":"待审核","1":"审核通过","2":"审核拒绝"}, title: '状态'},
                    {field: 'create_time', title: '申请时间',search: 'range'},
                    {
                        width: 250,
                        title: '操作',
                        templet: ea.table.tool,
                        operat: [
                            [{
                                text: '认证信息',
                                url: init.info_url,
                                method: 'open',
                                auth: 'info',
                                class: 'layui-btn layui-btn-xs layui-btn-success',
                                extend: 'data-full="true"',
                            },{
                                text: '编辑审核',
                                url: init.edit_url,
                                method: 'open',
                                auth: 'edit',
                                class: 'layui-btn layui-btn-xs layui-btn-normal',
                                extend: 'data-full="true"',
                            }],
                        ]
                    },
                ]],
            });
            ea.listen();
        },
        edit: function () {
            ea.listen();
        },
        info: function () {

            ea.listen();
        },
    };
    return Controller;
});